<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<title>{$head[title]}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta content="{$head[keywords]}" name="keywords" />
<meta content="{$head[description]}" name="description" />
<base href="{SITE_URL}" />
<link href="favicon.ico" rel="shortcut icon" />
<link href="skin/style.css" rel="stylesheet" type="text/css" />
<link rel="alternate" type="application/rss+xml" title="{$head[title]}" href="/rss.php?rssid={$catid}" />
<script language="JavaScript" src="misc/config.js"></script>
<script language="JavaScript" src="misc/jquery.min.js"></script>
<script language="JavaScript" src="misc/common.js"></script>
<script language="JavaScript" src="misc/validator.js"></script>
</head>
<body>

{template 'header.html'}

<div class="container">
    
    <div class="main">
    
    	
        <ul class="nav nav-tabs">
        <li {if !$category || $category=='index'} class="active" {/if}><a href="{url("?module=$module&userid=$userid")}"><span>所有产品</span></a></li>
        </ul>
        
        
        
       
            	 <div class="button-toolbar">
                      <div class="button-group">
                        <a href="?module={$module}&file={$file}&action={$action}&view_type=2&catid={$catid}&pagesize={$pagesize}&areaname={$areaname}&order={$order}" class="button {if $view_type==2}disabled{/if}"><i class="icon-th"></i>图片</a>
                        <a href="?module={$module}&file={$file}&action={$action}&view_type=1&catid={$catid}&pagesize={$pagesize}&areaname={$areaname}&order={$order}" class="button {if $view_type==1}disabled{/if}"><i class="icon-th-list"></i>图文</a>
                        <a href="?module={$module}&file={$file}&action={$action}&view_type=3&catid={$catid}&pagesize={$pagesize}&areaname={$areaname}&order={$order}" class="button {if $view_type==3}disabled{/if}"><i class=" icon-align-justify"></i>文字</a>
                      </div>
                      
                      <div class="button-group">
                        <a href="?module={$module}&file={$file}&action={$action}&view_type={$view_type}&catid={$catid}&pagesize=20&areaname={$areaname}&order={$order}" class="button {if $pagesize==20}disabled{/if}">每页显示20</a>
                <a href="?module={$module}&file={$file}&action={$action}&view_type={$view_type}&catid={$catid}&pagesize=40&areaname={$areaname}&order={$order}" class="button {if $pagesize==40}disabled{/if}">每页显示40</a>
                <a href="?module={$module}&file={$file}&action={$action}&view_type={$view_type}&catid={$catid}&pagesize=60&areaname={$areaname}&order={$order}" class="button {if $pagesize==60}disabled{/if}">每页显示60</a>
                      </div>
                      
                      <div class="button-group">
                        <a href="?module={$module}&file={$file}&action={$action}&view_type={$view_type}&catid={$catid}&pagesize={$pagesize}&areaname={$areaname}&order=0" class="button {if !$order}disabled{/if}">↑单价（元）</a>
                <a href="?module={$module}&file={$file}&action={$action}&view_type={$view_type}&catid={$catid}&pagesize={$pagesize}&areaname={$areaname}&order=1" class="button {if $order}disabled{/if}">↓单价（元）</a>
                      </div>
                       
                </div>
      
      
      			<form name='myform' id='myform' method="get">
                    <input type="hidden" name="pagesize" value="{$pagesize}">
                    <input type="hidden" name="catid" value="{$catid}">
                    <input type="hidden" name="view_type" value="{$view_type}">
                    <input type="hidden" name="order" value="{$order}">
                    <select name="areaname" id="areaname" onChange="my_submit(this.form);">
                    <option value=""> 所在地</option>
                    <option value='江苏,浙江,上海'>江浙沪</option>
                    <option value='广州,深圳,中山,珠海,佛山,东莞,惠州'>珠三角</option>
                    <option value='香港,澳门,台湾'>港澳台</option>
                    <option value='海外'>海外</option>
                    <option value='北京'>北京</option>
                    <option value='上海'>上海</option>
                    <option value='杭州'>杭州</option>
                    <option value='广州'>广州</option>
                    <option value='深圳'>深圳</option>
                    <option value='南京'>南京</option>
                    <option value='武汉'>武汉</option>
                    <option value='天津'>天津</option>
                    <option value='成都'>成都</option>
                    <option value='哈尔滨'>哈尔滨</option>
                    <option value='重庆'>重庆</option>
                    <option value='宁波'>宁波</option>
                    <option value='无锡'>无锡</option>
                    <option value='济南'>济南</option>
                    <option value='苏州'>苏州</option>
                    <option value='温州'>温州</option>
                    <option value='青岛'>青岛</option>
                    <option value='沈阳'>沈阳</option>
                    <option value='福州'>福州</option>
                    <option value='西安'>西安</option>
                    <option value='长沙'>长沙</option>
                    <option value='合肥'>合肥</option>
                    <option value='南宁'>南宁</option>
                    <option value='南昌'>南昌</option>
                    <option value='郑州'>郑州</option>
                    <option value='厦门'>厦门</option>
                    <option value='大连'>大连</option>
                    <option value='常州'>常州</option>
                    <option value='石家庄'>石家庄</option>
                    <option value='东莞'>东莞</option>
                    <option value='安徽'>安徽</option>
                    <option value='福建'>福建</option>
                    <option value='甘肃'>甘肃</option>
                    <option value='广东'>广东</option>
                    <option value='广西'>广西</option>
                    <option value='贵州'>贵州</option>
                    <option value='海南'>海南</option>
                    <option value='河北'>河北</option>
                    <option value='黑龙江'>黑龙江</option>
                    <option value='河南'>河南</option>
                    <option value='湖北'>湖北</option>
                    <option value='湖南'>湖南</option>
                    <option value='江苏'>江苏</option>
                    <option value='江西'>江西</option>
                    <option value='吉林'>吉林</option>
                    <option value='辽宁'>辽宁</option>
                    <option value='内蒙古'>内蒙古</option>
                    <option value='宁夏'>宁夏</option>
                    <option value='青海'>青海</option>
                    <option value='山东'>山东</option>
                    <option value='山西'>山西</option>
                    <option value='陕西'>陕西</option>
                    <option value='四川'>四川</option>
                    <option value='新疆'>新疆</option>
                    <option value='西藏'>西藏</option>
                    <option value='云南'>云南</option>
                    <option value='浙江'>浙江</option>
                    <option value="">所有地区</option>
                    <option value='other'>其它</option>
                    </select>
                    </form>
            
         
            	
    
                
            
   
            
            
            
        
        
        <div class="mod">
        	<div class="head">产品分类</div>
            <div class="body">
            	 
            	<!--{if $catid}-->
                <dl id="catlist">
                  <dt>{$catname}</dt>
                  <!--{loop $arrchildid $cid $c}-->
                    <dd><a href="{url('product',$cid)}">{$c[catname]}</a><span>({$CATEGORY[$cid][pitems]})</span></dd>
                   <!--{/loop}-->
                </dl>
                <!--{/if}-->
            </div>
        </div>
         
        <div class="mod">
        	<div class="head">产品列表</div>
            <div class="body">
                
                
                <style type="text/css">
					.product-view-list dl{
						width:200px; float:left; display:inline;
					}
				</style>

                    <div class="row">
                {get sql="$sql" rows="$pagesize" page="$page" urlrule="$urlrule"}
                    <dl class="span2">
                      <dd class="pic"><a href="{url($r[url])}"><img src="{php echo $r[thumb] ? thumb($r[thumb],126,80) : 'misc/nopic.gif'}" alt="产品图片" width="120" height="80"/></a></dd>
                      <dd><a href="{url($r[url])}">{$r[title]}</a></dd>
                      <dd>产品简介：{str_cut(strip_tags($r[content]),180,'..')}</dd>
                      <dd>{date('Y-m-d H:i',$r[inputtime])}</dd>
                      <dd>生产商：<a href="{url("?module=$module&userid=$r[userid]")}">{$r[companyname]}</a></dd>
                      <dd>{if $r['price']}{$r[price]}元{else}<a class="button button-small" href="{url("?module=$module&action=guestbook&userid=$r[userid]")}">我要询价</a>{/if}</dd>
                      <dd><a href="?module={$module}&file={$file}&action={$action}&pagesize=20&catid=0&view_type=1&order=&areaname={urlencode($r[areaname])}">{$r[areaname]}</a></dd>
                    </dl>
                {/get}
                   </div>
                   
        
                    
                    <div class="pagination">{$pages}</div>
    
            </div>
        </div>
         
    
    </div>
    
    
    <div class="aside">
        
        <div class="mod">
            <div class="body">
                
                 <ul class="nav nav-tabs nav-stacked">
                 <li class="active"><a href="#">产品库大类列表</a></li>
                 <!--{loop $CAT $cid $c}-->
                  <li><a href="{url('product',$c['catid'])}">{$c['catname']}</a></li>
                  <!--{/loop}-->
                </ul>
                
            </div>
        </div>
        
        
        
        <div class="mod">
        	<div class="head">浏览过的产品</div>
            <div class="body">
                <ul class="pic_list_1">
                  {if $prowhere}
                      {get sql="SELECT id,title,thumb,url FROM `table_yellowpage_product` WHERE id IN ($prowhere) AND status = '99' ORDER BY FIND_IN_SET(id,'$prowhere')" rows="10"}
                      <li><a href="{url($r[url])}"><img src="{thumb($r['thumb'],48,48,1,'images/no_pic_50_50.gif')}" alt="" width="48" height="48"/></a><a href="{show_url('product',$r[id])}" title="{$r['title']}">{$r['title']}</a></li>
                      {/get}
                  {else}
                  <li>您还没有浏览过任何商品</li>
                  {/if}
                  </ul>
            </div>
        </div>
        
        
        <div class="mod">
        	<div class="head">最新产品</div>
            <div class="body">
                <ul>
                {get sql="SELECT p.id,p.title,p.thumb,c.companyname,p.userid,p.url FROM `table_yellowpage_product` `p`,`table_member_company` `c` WHERE c.userid = p.userid AND p.status = '99' ORDER BY id DESC" rows="10"}
                    <li>
                        <img src="{thumb($r['thumb'],48,48,1,'images/no_pic_50_50.gif')}" alt="" width="48" height="48"/>
                        <a href="{url($r[url])}" title="{$r['title']}"><strong>{str_cut($r['title'],20,'')}</strong></a>
                        <span><a href="{$r[userid])}" title="{$r['companyname']}">{str_cut($r['companyname'],20,'')}</a></span>
                    </li>
                {/get}
              </ul>
            </div>
        </div>
        
        
        <div class="mod">
        	<div class="head">推荐产品</div>
            <div class="body">
                <ul>
                {get sql="SELECT p.id,p.title,p.thumb,c.companyname,p.userid,p.url FROM `table_yellowpage_product` `p`,`table_member_company` `c` WHERE c.userid = p.userid AND p.elite = 1 AND p.status = '99' ORDER BY id DESC" rows="10"}
                    <li><img src="{thumb($r['thumb'],48,48,1,'images/no_pic_50_50.gif')}" alt="" width="48" height="48"/><a href="{url($r[url])}"><strong>{str_cut($r['title'],20,'')}</strong></a><a href="{$r['userid']}"><span>{str_cut($r['companyname'],20,'')}</span></a></li>
                {/get}
              </ul>
            </div>
        </div>
        
    </div>
    
</div>


<SCRIPT LANGUAGE="JavaScript">
<!--
function my_submit(form)
{
	form.submit();
}
$("#areaname").children().each(function(){  if (this.value == '{if $areaname}{urldecode($areaname)}{else}0{/if}')this.selected = true;});
//-->
</SCRIPT>
{template 'footer.html'}